package com.klxedu.ms.gateway.core.json;

/**
 * 标准JSON结构对象，包含data、success及message属性，success默认为true
 * @author LiuHG
 * @version 1.0
 */
public class BaseJsonObject<T> implements JsonObject<T>{
	
	private T data;
	private String code;
	private String message;
	
	public BaseJsonObject() {
		this(null);
	}
	
	public BaseJsonObject(T data) {
		this(data,ResponesCode.SUCCESS);
	}
	
	public BaseJsonObject(T data,String code) {
		this(data,code,null);
	}
	
	public BaseJsonObject(T data,String code,String message) {
		this.data = data;
		this.code = code;
		this.message = message;
	}
	
	public T getData() {
		return data;
	}
	public void setData(T data) {
		this.data = data;
	}
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	
}
